import http from './request'

// 获取下拉数据
export const getDataByParentCode = (code) => {
    return http({
        url: '/hongyun-training/common/getDataByParentCode?parentCode=' + code,
        method: 'GET'
    })
}
//获取数据
export const existingmaterialList = (data, current, size) => {
    return http({
        url: '/hongyun-training/existingmaterial/list?current=' + current + '&size=' + size,
        method: 'POST',
        data: data
    })
}
// 新增或修改
export const existingmaterialSubmit = (data) => {
    return http({
        url: '/hongyun-training/existingmaterial/submit',
        method: 'POST',
        data: data
    })
}
// 逻辑删除
export const existingmaterialRemove = (ids) => {
    return http({
        url: `/hongyun-training/existingmaterial/remove?ids=${ids}`,
        method: 'POST'
    })
}
// 详情
export const existingmaterialDetail = (id) => {
    return http({
        url: `/hongyun-training/existingmaterial/detail?id=${id}`,
        method: 'GET'
    })
}
// 必备物资列表
export const necessarymaterialList = () => {
    return http({
        url: `/hongyun-training/necessarymaterial/selectList`,
        method: 'POST',
        data: {}
    })
}
// 报废
export const existingmaterialscrapSave = (data) => {
    return http({
        url: `/hongyun-training/existingmaterialscrap/save`,
        method: 'POST',
        data: data
    })
}